
# 登录系统
user_data = ["zhichao","youge"]
password_data = "4321"
user_data_vip = "wingyi"
vip_password = "911"

count = 3
while True:
    # count 自减1: count _= 1
    count -= 1
    # 用户登入的信息
    username = input("请输入您的账户：")
    password = input("请输入您的密码：")
    # 1.先判断账户
    if username in user_data or username in user_data_vip:  # 判断账号是否正确  此处为账号正确
        if password in password_data :  # 密码正确
            print("欢迎普通用户", username, "登陆系统使用")
            count = 5
        if password in vip_password :
            print("欢迎vip用户", username, "登陆系统使用")
            count = 10


        import datetime
        day = datetime.datetime.today().weekday()
        week_day = int(day)

        print("今日课程安排为：")
        # 2.判断具体条件输出当前的课。
        if week_day == 0:
                print("1-3 批判性阅读思辨")
                print("4-5 羽毛球")
                print("8-10 python")
        elif week_day == 1:
                print("3-5 学术听说")
                print("8-9 H5")
                print("12-13 法语语言与艺术")
        elif week_day == 2:
                print("3-5毛概理论")
        elif week_day == 3:
                print("1-2 学术写作")
                print("8-9 毛概实践")
        elif week_day == 4:
                print("1-2 AI")
                print("3-5 创业基础")
        else:
                print("周六、周日")
                print("无课")

        choise = "Y"
        while True:
                count -= 1
                userchoise = input("继续查询具体某天的课程Y/N")
                if userchoise == choise:
                    a = input("请输入想要查询的天（注意：请输入纯数字）：")
                    b = "1"
                    c = "2"
                    d = "3"
                    e = "4"
                    f = "5"
                    g = "6"
                    h = "7"
                    if a == b:
                        print("1-3 批判性阅读思辨")
                        print("4-5 羽毛球")
                        print("8-10 python")
                        print("您还有", count, "次查询机会")
                    elif a == c:
                        print("3-5 学术听说")
                        print("8-9 H5")
                        print("12-13 法语语言与艺术")
                        print("您还有", count, "次查询机会")
                    elif a == d:
                        print("3-5毛概理论")
                        print("您还有", count, "次查询机会")
                    elif a == e:
                        print("1-2 学术写作")
                        print("8-9 毛概实践")
                        print("您还有", count, "次查询机会")
                    elif a == f:
                        print("1-2 AI")
                        print("3-5 创业基础")
                        print("您还有", count, "次查询机会")
                    elif a == g:
                        print("周六")
                        print("无课")
                        print("您还有", count, "次查询机会")
                    elif a == h:
                        print("周日")
                        print("无课")
                        print("您还有", count, "次查询机会")
                if choise == "N" :
                    print("查询停止")
                    break
                else:
                   if count == 0:
                    print("您当日可查询次数已到达上限，请明天再来查询")
                    break
        else:
            if count == 0:
                print("你都输入三次了，还不对，五分钟后再输吧！")
                break
            else:
                print("您输入的账号或密码不正确，请重新输入，您还有", count, "次机会")

    else:
        if count == 0:
            print("你都输入三次了，还不对，五分钟后再输吧！")
            break
        else:
            print("您输入的账号或密码不正确，请重新输入，您还有", count, "次机会")


